'''
Created on Jul 21, 2011

@author: anupams
'''

class GraphObjects(object):
    '''
    Graph samples class
    '''
    def __init__(self):
      self.name = None
      self.adjucancyList = None

    def directedGraph1(self):
        self.name = ['u', 'v', 'w', 'x', 'y', 'z']
        self.adjucancyList = {
                       'u' : ['v', 'x'],
                       'v' : ['y'],
                       'w' : ['y', 'z'],
                       'x' : ['v'],
                       'y' : ['x'],
                       'z' : ['z']
                       }

    def directedGraph2(self):
        self.name = ['s', 't', 'u', 'v', 'w', 'x', 'y', 'z']
        self.adjucancyList = {
                       's' : ['z', 'w'],
                       't' : ['u', 'v'],
                       'u' : ['v', 't'],
                       'v' : ['s', 'w'],
                       'w' : ['x'],
                       'x' : ['z'],
                       'y' : ['x'],
                       'z' : ['y']
                       }

    def biDirectionalGraph1(self):
        self.name = ['r', 's', 't', 'u', 'v', 'w', 'x', 'y']
        self.adjucancyList = {
                     'r' : ['s', 'v'],
                     's' : ['r', 'w'],
                     't' : ['u', 'w', 'x'] ,
                     'u' : ['t', 'x', 'y'],
                     'v' : ['r'],
                     'w' : ['s', 't', 'x'],
                     'x' : ['t', 'u', 'w', 'y'],
                     'y' : ['u', 'x']
                     }

    def biDirectionalGraph2(self):
        self.name = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
        self.adjucancyList = {
                     'a' : [{'childname' : 'b' ,
                             'weight' : 4},
                             {'childname' : 'h' ,
                             'weight' : 8}
                             ],
                     'b' : [{'childname' : 'a' ,
                             'weight' : 4},
                             {'childname' : 'h' ,
                             'weight' : 11},
                             {'childname' : 'c' ,
                             'weight' : 8}
                             ],
                     'c' : [{'childname' : 'b' ,
                             'weight' : 8},
                             {'childname' : 'i' ,
                             'weight' : 2},
                             {'childname' : 'f' ,
                             'weight' : 4},
                             {'childname' : 'd' ,
                             'weight' : 7}
                             ],
                     'd' : [{'childname' : 'c' ,
                             'weight' : 7},
                             {'childname' : 'f' ,
                             'weight' : 14},
                             {'childname' : 'e' ,
                             'weight' : 9}
                             ],
                     'e' : [{'childname' : 'd' ,
                             'weight' : 9},
                             {'childname' : 'f' ,
                             'weight' : 10}
                             ],
                     'f' : [{'childname' : 'c' ,
                             'weight' : 4},
                             {'childname' : 'd' ,
                             'weight' : 14},
                             {'childname' : 'e' ,
                             'weight' : 10},
                             {'childname' : 'g' ,
                             'weight' : 2}
                             ],
                     'g' : [{'childname' : 'i' ,
                             'weight' : 6},
                             {'childname' : 'f' ,
                             'weight' : 2},
                             {'childname' : 'h' ,
                             'weight' : 1}
                             ],
                     'h' : [{'childname' : 'a' ,
                             'weight' : 8},
                             {'childname' : 'b' ,
                             'weight' : 11},
                             {'childname' : 'i' ,
                             'weight' : 7},
                             {'childname' : 'g' ,
                             'weight' : 1}
                             ],
                     'i' : [{'childname' : 'c' ,
                             'weight' : 2},
                             {'childname' : 'g' ,
                             'weight' : 6},
                             {'childname' : 'h' ,
                             'weight' : 7}
                             ]
                     }

if __name__ == '__main__':
  pass
